package hadoopdemo;

import java.net.URI;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;

public class HDFSAPIDemo {

	public static void main(String[] args) throws Exception{
		HDFSAPIDemo hdfsapiDemo = new HDFSAPIDemo();
		FileSystem fileSyetem = hdfsapiDemo.getFileSystem();
		System.out.println(fileSyetem);
	}
	public FileSystem getFileSystem() throws Exception{
		URI uri = new URI("hdfs://192.168.136.128:9000");
		Configuration configuration = new Configuration();
		FileSystem fileSystem = FileSystem.get(uri, configuration);
		return fileSystem;
	}

}
